package com.evil.application.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.evil.application.pojo.entity.ApplicationOrderNode;
import com.evil.common.application.dto.order.node.OrderNodesDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Optional;

/**
 * 应用订单节点记录表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationOrderNodeMapper extends BaseMapper<ApplicationOrderNode> {

    Optional<ApplicationOrderNode> findByOrderIdAndNodeId(@Param("orderId") Long orderId, @Param("nodeId") Long nodeId);

    List<ApplicationOrderNode> findProcessingOrderNode(@Param("orderId") Long orderId, @Param("handleType") Integer handleType);

    List<ApplicationOrderNode> findByOrderNodes(@Param("orderNodes") List<OrderNodesDTO> orderNodes);
}